Copyright: Port Monitor Help V1.37 ©1999 Comtrol Corporation
Citation: Port Monitor Help V1.37 ©1999 Comtrol Corporation. All rights reserved.


Contents
Port Monitor Help Contents

Overview

Using Port Monitor

Changing Screen Appearance

Configuring Reports

Port Monitor Files

Port Monitor Variables

Obtaining Technical Support

Copyrights and Trademarks

 Shortcut to Port Monitor program


Overview

The Port Monitor program (portmon.exe) offers a summary of all port statistics in one easy-to-read spreadsheet view. This enables you to verify operation of all Comtrol serial ports from a single window.

The Port Monitor display follows the familiar spreadsheet model: each COM port is a horizontal row, and each vertical column displays a variable or value for the respective COM port. (For explanations of the terms and abbreviations used, see Port Monitor Variables.) Port Monitor can also produce statistics and reports that can help you verify the operation of the COM ports and connected peripherals.

Some immediate feedback includes:

•	The state of the modem control and status signals.

•	Open ports.

•	Raw byte input and output counts.

•	Port errors.

The available statistics include:

•	Instantaneous characters per second (CPS) calculations.

•	Minute, hour, and day CPS averages and peaks.

•	Carrier detect (CD) signal runtime and transition count.

Reports can be automatically generated on an hourly and/or daily basis. A report can cover all ports collectively, or you can produce a separate report for each port. You can also set how often the values are recalculated, fine-tuning thoroughness against system efficiency, and automatically run external batch files to perform additional processing and analysis after the reports are generated.


Using Port Monitor

To run Port monitor, select Port Monitor from the Comtrol program group, or click this button:

Once the monitor window is displayed, Port Monitor is active and collecting data. If any cumulative data has been saved from previous sessions, it is automatically brought in and used.

Port Monitor will continue running and collecting data until you terminate it, at which point all accumulated data is automatically saved for use in the next session.

Related Topics

 Changing screen appearance

 Resetting the Display

 How calculations are performed

 Report configuration

 Monitor screen variable definitions

 Port Monitor files


Changing Screen Appearance

To change the width of a column, left-click on the column separator (vertical) line and drag it to the desired width.

To change the placement of columns, left-click in the middle of the column you want to move and drag it to the desired location.

To remove a column, right-click on the column you want to remove and select Remove from the pop-up menu.

To add a column, right-click on the column now occupying the desired location, and select Add from the pop-up menu. You will be prompted to name the variable you want to display, as well as other information. (See Column Setup.) After you click OK, the column is inserted in the selected location and the existing column is moved to the right.

To change the font for all columns, select Font from the Edit menu.

To change the properties of a column, right-click on the column and select Properties from the pop-up menu. (See Column Setup.)


Resetting the Display

To clear all fields in the Port Monitor display and reset them to their null values, right click on the upper left cell in the table and select Reset from the pop-up menu.

To clear any single cell except the upper left one, right click on the cell to be cleared and select Reset from the pop-up menu.

Raw data is not cleared.


Monitor Calculations

The main display view can show a number of statistics about port usage. The statistics are based on information obtained from the Comtrol port software on a periodic basis. The rate at which this occurs can be varied and set in the Configuration options.  The default is set to update every 2 second.

The raw data obtained per port every update time includes:

•	TxTotalRaw - total running count (32-bit) of bytes sent from the port.

•	RxTotalRaw - total running count (32-bit) of bytes received from the port.

•	TxPkts - total running count (16-bit) of write operations for the port.

•	RxPkts - total running count (16-bit) of read operations for the port.

•	StatusFlags - this includes all of the digital signals (on/off)  including state of the input and output signals, port open status, etc.

•	OverrunErrorsRaw - total count of receive overrun errors, per port.

•	FramingErrorsRaw - total count of receive framing errors, per port.

•	ParityErrorsRaw -  total count of receive parity errors, per port.

Using this information, the program calculates some additional accumulated and average values for statistical measures. Note that the raw data is available without leaving the program running, while the additional calculated values require that Port Monitor be left running.

The instantaneous CPS (characters per second) values are calculated every "Update Time", and are based on the time difference from the last update time.  Since this update time can be set from 1 second and up, the configured update time does affect this calculation.


Column Setup

When you select Add or Properties from the column pop-up menu, the Column Setup window displays.

•	Use the Input droplist to select the variable displayed in the column.
Use the Type droplist to select the way in which the value is displayed: either as an integer, as an on/off state, as an integer with a kilo, mega, or giga suffix, or as an hh:mm:ss time stamp. This defaults to the appropriate type for the selected Input variable.

•	Use the Name variable to change the column heading to a more-meaningful name, if desired.

•	Use the Width variable to specify the column width in characters.

•	Use Color0 to set the column character color when the value is zero.

•	Use Color1 to set the column character color when the value is not zero.

When you are done with this window, click OK to save your changes and return to the Port Monitor window.


Configuring Reports

To view a report after it has been generated, use the Edit Report option on the File menu, or use a system tool such as NOTEPAD.

To configure reporting, select Config from the Edit menu. The Program Setup window displays.

•	Single report options cover all ports, and are overwritten each time the report is generated.

•	Multiple report options generate a separate report for each port, and each report file is appended each time the report is generated.

Hour Reports

For Hour reports, use the Single and Multiple droplists to select whether you are generating single or multiple reports, or both. For each report type, select from the following types of data to include:

•	None: no report is generated

•	Hour Data: only variables with the word “Hour” in the name are included

•	All Data: all variables are included

•	View Data: only the variables that appear in the Port Monitor window are included

The External Program field is used to enter a command line to run another program after the hourly reports have been generated. For example, you can use this to run a batch file that performs custom report processing. The Test button causes the command line to be executed immediately.

Day Reports

For Day reports, the Single and Multiple droplists behave the same, but your choices are:

•	None: no report is generated

•	Day Data: only variables with the words “Day” or “Raw” in the names are included

•	All Data: all variables are included

•	View Data: only the variables that appear in the Port Monitor window are included

Likewise, the External Program field is used to enter a command line to be executed after the daily reports have been generated.

Update Time

This option allows you to set the rate at which the port information is obtained and the calculations performed. There is a trade-off between Port Monitor efficiency and response time. If you are using Port Monitor to view the port activity on the screen, you may want to set the update time to 1 or 2 seconds, so that the screen is updated frequently. If you are concerned about the monitor program using CPU resources, set this to a higher value (6 to 20 seconds) in order to decrease the time required by the program to perform the calculations and update the screen.

If Port Monitor is left active to generate reports, minimizing or reducing the display area of the program will help reduce CPU requirements of updating the screen.


Port Monitor Files

Port Monitor creates and uses the following files.

The default column layout is saved in PORTMON.VEW. If you have been experimenting with the appearance of the monitor screen, you can use the File menu Save option to save your customized layout in another .VEW file (which you can retrieve later by using the File menu Open option) or you can use the Edit menu View Default option to retrieve PORTMON.VEW and restore the default view.

Port Monitor also creates a \REPORTS directory. All hourly and daily reports are saved in this directory, under the following names:

•	hall.txt - hourly single report

•	dall.txt - daily single report

•	hcomx.txt - hourly multiple reports, where x is the port number

•	dcomx.txt - daily multiple reports, where x is the port number

WARNING: Since multiple reports append new data each time they are written, the multiple report files grow in size. It is up to you to delete them periodically.

Some safeguards are built into the program to avoid filling up a hard disk drive due to growing report files. The monitoring program stops writing additional data to the multiple reports if they reach a size of 2 MB. Also, the program will not write out data files to the disk drive if the spare room on the drive is less than 2 MB in size.

All calculations are saved at program exit and on the hour in a binary file called CALCS.DAT. This enables you to halt Port Monitor execution without losing accumulated data.


Port Monitor Variables

The following table lists Port Monitor variables.

Variable	Description
Open	Open status, on if open, off if closed.
Cts	Input CTS pin status.
Dsr	Input DSR pin status.
Cd	Input CD (carrier detect) pin status.
Rts	Output RTS pin status.
Dtr	Output DTR pin status.
TxTotal	Transmit total bytes sent.
RxTotal	Receive total bytes sent.
TxCPSInst	Transmit characters per second, instantaneous average.
RxCPSInst	Receive characters per second, instantaneous average.
Errors	Total hardware receive errors (parity, framing, overruns.)
TxMinCPS	Transmit characters per second, last minute average.
RxMinCPS	Receive characters per second, last minute average.
TxCPSMinAvMax	Peak TxCPSInst for last minute.
RxCPSMinAvMax	Peak RxCPSInst for last minute.
TxCPSHourAvMax	Peak TxMinCPS for last hour.
RxCPSHourAvMax	Peak RxMinCPS for last hour.
TxCPSDayAvMax	Peak TxMinCPS for last day.
RxCPSDayAvMax	Peak RxMinCPS for last day.
TxTotalRaw	Transmit total number of bytes raw data.
RxTotalRaw	Receive total number of bytes raw data.
TxMinCnt	Count of transmit bytes sent last minute.
TxHourCnt	Count of transmit bytes sent last hour.
TxDayCnt	Count of transmit bytes sent last day.
RxMinCnt	Count of receive bytes sent last minute.
RxHourCnt	Count of receive bytes sent last hour.
RxDayCnt	Count of receive bytes sent last day.
TxMinCntWrk	Count of transmit bytes sent this minute.
TxHourCntWrk	Count of transmit bytes sent this hour.
TxDayCntWrk	Count of transmit bytes sent this day.
RxMinCntWrk	Count of receive bytes sent this minute.
RxHourCntWrk	Count of receive bytes sent this hour.
RxDayCntWrk	Count of receive bytes sent this day.
TxCPSMinAvMaxWrk	Peak TxCPSInst for current minute.
TxCPSHourAvMaxWrk	Peak TxMinCPS for current hour.
TxCPSDayAvMaxWrk	Peak TxHourCPS For current day.
RxCPSMinAvMaxWrk	Peak RxCPSInst For current minute.
RxCPSHourAvMaxWrk	Peak RxMinCPS For current hour.
RxCPSDayAvMaxWrk	Peak RxHourCPS For current day.
CDRuns	Count of times carrier detect turns on.
CDDayRuns	Count of times carrier detect turns on last day.
CDDayRunsWrk	Count of times carrier detect turns on current day.
CDRunTime	Time in seconds carrier detect has been on.
CDHourRunTime	Time in seconds carrier detect has been on last hour.
CDDayRunTime	Time in seconds carrier detect has been on last day.
CDHourRunTimeWrk	Time in seconds carrier detect has been on this hour.
CDDayRunTimeWrk	Time in seconds carrier detect has been on this day.
StatusFlags	Bit flags, Open, CTS, DSR, CD, RTS, DTR
TxPkts	Raw count of total transmit packets sent.
RxPkts	Raw count of total receive packets sent.
OverrunErrors	Total count of receive overrun errors.
FramingErrors	Total count of receive framing errors.
ParityErrors	Total count of receive parity errors.
OverrunErrorsRaw	Total count of receive overrun errors.
FramingErrorsRaw	Total count of receive framing errors.
ParityErrorsRaw	Total count of receive parity errors.


Obtaining Technical Support
Technical Support

Comtrol manuals and other documents are available in electronic form on the Comtrol web site. Software updates can be downloaded from the Comtrol ftp site. Always check the web and ftp sites to make sure that you have the current software and documentation.

Comtrol has a staff of support technicians available to help you. Telephone support is available during standard daytime business hours, Monday through Friday (holidays excluded).

Corporate Corporate Headquarters

Internet URL: http://www.comtrol.com

email: support@comtrol.com

FTP site: ftp://ftp.comtrol.com

FAX: (651) 631-8117

Phone: (651) 631-7654

Comtrol Europe

Internet URL: http://www.comtrol.co.uk

email: support@comtrol.co.uk

FAX: +44 (0) 1 869-323-211

Phone: +44 (0) 1 869-323-220


Copyrights and Trademarks

All software and contents 1995 - 1999 Comtrol Corporation.

All Rights Reserved.

Comtrol Corporation makes no representations or warranties with regard to the contents of this documentation file or to the suitability of the Comtrol products for any particular purpose. Specifications subject to change without notice. Some software or features may not be available at the time of publication. Contact your reseller for current product information.

Trademarks

Comtrol is a trademark of Comtrol Corporation.

Microsoft, Windows, Windows 95, Windows 98, Windows NT, and Windows 2000 are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

Other product names mentioned herein may be trademarks and/or registered trademarks of their respective companies.